<template>
  <van-swipe :autoplay="3000" indicator-color="white">
    <van-swipe-item v-for="(item,index) in list" :key="index">
      <img :src="item" alt />
    </van-swipe-item>
  </van-swipe>
</template>
<script>
export default {
  data() {
    return {
      list: [],
      flag: true
    };
  },
  methods: {
    getList() {
      let url = "/product/getBanners";
      this.$axios
        .get(url)
        .then(res => {
          this.list = res.banners;
        })
        .catch(err => {
          console.log("err", err);
        });
    }
  },
  created() {
    this.getList();
  }
};
</script>
<style lang="css" scoped>
</style>
<style>
img {
  /* height: 213.83px; */
  width: 100%;
}
</style>